<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var m = +prompt('输入身高');
        var kg = +prompt('输入体重');
        var bmi = kg / (m ** 2);
        if (bmi > 28) {
            alert(`你太胖了`);
        } else if (bmi >= 24) {
            alert(`你有点胖了`);
        } else if (bmi >= 18.5) {
            alert(`你的体重很正常`);
        } else {
            alert(`你太轻了，要多吃点`);
        }
    </script>
</head>

<body>

</body>

</html>